home *** CD-ROM | disk | FTP | other *** search
/ Geek Games #12 / GEGA012.iso / Jogos de Azar / 1721-apuesten.swf / scripts / C_DicesAnimationCLASS.as < prev    next >
Text File  |  2006-01-17  |  1KB  |  42 lines

  1. _global.C_DicesAnimationCLASS = function()
  2. {
  3.    this.init();
  4. };
  5. C_DicesAnimationCLASS.prototype = new MovieClip();
  6. C_DicesAnimationCLASS.prototype.init = function()
  7. {
  8.    this.start(random(6) + 1,random(6) + 1,true);
  9. };
  10. C_DicesAnimationCLASS.prototype.getDicePos = function()
  11. {
  12.    var d = this._currentDiceCaller++ % 2 + 1;
  13.    return this["dice_" + d];
  14. };
  15. C_DicesAnimationCLASS.prototype.start = function(first, second, refresh)
  16. {
  17.    this.dice_1 = first;
  18.    this.dice_2 = second;
  19.    this.gotoAndStop(1);
  20.    this.gotoAndStop(random(5) + 2);
  21.    Conv.stop();
  22.    if(refresh)
  23.    {
  24.       this.dices.gotoAndStop("result");
  25.    }
  26.    else
  27.    {
  28.       this.dices.gotoAndPlay(1);
  29.    }
  30. };
  31. C_DicesAnimationCLASS.prototype.clear = function()
  32. {
  33.    this.dices.gotoAndPlay("result");
  34.    Conv.stop();
  35. };
  36. C_DicesAnimationCLASS.prototype.onAnimStoped = function()
  37. {
  38.    Conv.play();
  39. };
  40. ASSetPropFlags(_global,"C_DicesAnimationCLASS",131);
  41. Object.registerClass("C_DicesAnimationCLASS",C_DicesAnimationCLASS);
  42.